﻿namespace GreenIsomer.Data.Entities.Transform {
	using System;
	using System.Xml.Serialization;

	[Serializable, XmlType("MslOutput", Namespace = Settings.Namespace)]
	public class MslOutput : Output {

		public MslOutput() { }

		public override string TypeDescription {
			get { return "ADO.NET C/S Mapping Metadata"; }
		}

		public override string TypeName {
			get { return "MSL"; }
		}

		public override string DefaultFileExtension {
			get { return "msl"; }
		}

		public override void Convert(Input input, string baseDirectory) {
			EdmxInput edmxInput = input as EdmxInput;
			if(edmxInput == null) {
				base.Convert(input, baseDirectory);
				return;
			}

			WriteXml(edmxInput.MslNode, baseDirectory);
		}

	}

}